<template>
  <div class="hotGoodsList">
    <div class="title">
      <span>人气推荐</span>
      <span class="more">更多人气推荐<span>></span></span>
    </div>
    <div class="box">
      <div class="item" v-for="item in hotGoodsList" :key="item.id">
        <img :src="item.picUrl" />
        <div class="desc">
          <i>{{ item.name }}</i>
          <i class="brief">{{ item.brief }}</i>
          <div class="price">
            <span id="retail">{{ '¥' + item.retailPrice.toFixed(2) }}</span>
            <span id="counter">{{ '¥' + item.counterPrice }}</span>
          </div>
        </div>
      </div>
    </div>
  </div> 
</template>

<script setup>
defineProps(['hotGoodsList'])
</script>

<style scoped>
.hotGoodsList {
  background-color: #fff;
}
.title {
  width: 90%;
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
}
.box {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item {
  display: flex;
  gap: 10px;
  /* border: 1px solid #000; */
}
img { 
  
  width: 25%;
  /* padding: 10px; */
  object-fit: cover;
  /* border: 1px solid #000; */
}
.desc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#retail {
  font-size: 16px;
  padding-right: 20px;
}
#counter {
  font-size: 10px;
  text-decoration: line-through;
  color: rgb(182, 182, 182);
}
.desc i{
  font-size: 14px;
}
.brief{
  color: #646566;
}
.more{
  font-size: 14px;
  color: gray;
}
</style>
<!--  -->